import service from '@/utils/request'

// @Tags NonpreorderMaterial
// @Summary 创建无需预定物料编号
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.NonpreorderMaterial true "创建无需预定物料编号"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /nonpreorderMaterial/createNonpreorderMaterial [post]
export const createNonpreorderMaterial = (data) => {
  return service({
    url: '/nonpreorderMaterial/createNonpreorderMaterial',
    method: 'post',
    data
  })
}

// @Tags NonpreorderMaterial
// @Summary 删除无需预定物料编号
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.NonpreorderMaterial true "删除无需预定物料编号"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /nonpreorderMaterial/deleteNonpreorderMaterial [delete]
export const deleteNonpreorderMaterial = (params) => {
  return service({
    url: '/nonpreorderMaterial/deleteNonpreorderMaterial',
    method: 'delete',
    params
  })
}

// @Tags NonpreorderMaterial
// @Summary 批量删除无需预定物料编号
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除无需预定物料编号"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /nonpreorderMaterial/deleteNonpreorderMaterial [delete]
export const deleteNonpreorderMaterialByIds = (params) => {
  return service({
    url: '/nonpreorderMaterial/deleteNonpreorderMaterialByIds',
    method: 'delete',
    params
  })
}

// @Tags NonpreorderMaterial
// @Summary 更新无需预定物料编号
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.NonpreorderMaterial true "更新无需预定物料编号"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /nonpreorderMaterial/updateNonpreorderMaterial [put]
export const updateNonpreorderMaterial = (data) => {
  return service({
    url: '/nonpreorderMaterial/updateNonpreorderMaterial',
    method: 'put',
    data
  })
}

// @Tags NonpreorderMaterial
// @Summary 用id查询无需预定物料编号
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.NonpreorderMaterial true "用id查询无需预定物料编号"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /nonpreorderMaterial/findNonpreorderMaterial [get]
export const findNonpreorderMaterial = (params) => {
  return service({
    url: '/nonpreorderMaterial/findNonpreorderMaterial',
    method: 'get',
    params
  })
}

// @Tags NonpreorderMaterial
// @Summary 分页获取无需预定物料编号列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取无需预定物料编号列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /nonpreorderMaterial/getNonpreorderMaterialList [get]
export const getNonpreorderMaterialList = (params) => {
  return service({
    url: '/nonpreorderMaterial/getNonpreorderMaterialList',
    method: 'get',
    params
  })
}
